1. Technical Field
This invention generally relates to computer database systems, and more specifically relates to journal mechanisms and methods for computer database systems.
2. Background Art
Database systems have been developed that allow a computer to store a large amount of information in a way that allows a user to search for and retrieve specific information in the database. For example, an insurance company may have a database that includes all of its policy holders and their current account information, including payment history, premium amount, policy number, policy type, exclusions to coverage, etc. A database system allows the insurance company to retrieve the account information for a single policy holder among the thousands and perhaps millions of policy holders in its database.
Retrieval of information from a database is typically done using queries. A query usually specifies conditions that apply to one or more columns of the database, and may specify relatively complex logical operations on multiple columns. The database is searched for records that satisfy the query, and those records are returned as the query result. Structured Query Language (SQL) is one specific query language that may be used to query a database.
Changes to a database are typically stored in a database journal. Known database journals contain each change to a database on a row-by-row basis. This means that if 20 rows in a database are deleted, a corresponding 20 entries are made to the database journal, one entry for each deleted row. These row-by-row entries in the database journal may be used for different purposes. For example, if a database transaction fails, the information stored in the database journal may be used to roll back the transaction to put the database in the proper state before the transaction was commenced.
In another example, the data stored in a database journal may be used to maintain a replicated database. Many modem database systems have a primary database that is normally used, but also maintain a replicated (or mirrored) database that contains the same information as the primary database. In the event that the primary database fails, the system can quickly switch to the replicated database, thereby minimizing system downtime. One known way to replicate a database transmits journal entries from the primary database to the replicated database, which are then applied to the replicated database. One problem with this approach is that the journal contains an entry for each row operation, which must then be transmitted to the replicated database. Because replicated databases are typically on a different computer system, each journal entry must be transmitted via a network connection to the computer system that hosts the replicated database. The transmission of each journal entry consumes significant network bandwidth. Without a way to replicate a database without transmitting each row operation in a journal, the computer industry will continue to suffer from inefficient methods of database replication using known journal entries.